<?php 
/**
 * 
 * 购物 衣服 处理类
 * @author tanzhe
 *
 */
class shop {
	public function get() { //获得商店信息
		$url = new Url();
		$shopId = $url->get('shopid');
	  	$key = $url->get('key');
		$shopModel = new ShopModel(); 
		$ret = $shopModel->getShop($key, $shopId);
		
		$callback = $url->get('jsonpcallback');
		Json::do_jsonp_encode($callback,$ret);
	}
	
	public function buy() { //购买衣服
		$url = new Url();
		
	  	$key = $url->get('key');
		$label = $url->get('label');
		$shopModel = new ShopModel(); 
		$ret = $shopModel->buy($key, $label);
		
		$callback = $url->get('jsonpcallback');
		Json::do_jsonp_encode($callback,$ret);
	}	
}
?>